void waypt_add (waypoint *);
void waypt_del (waypoint *);
void waypt_disp_all(waypt_cb);
-void route(route_hdr, route_trl, waypt_cb);
+void route_disp_all(route_hdr, route_trl, waypt_cb);
unsigned int waypt_count(void);
route_head *route_head_alloc(void);
;
ff_vecs_t *find_vec(char *, char **);
void disp_vecs(void);
+void disp_formats(void);
void printposn(const coord *c, int is_lat);
void *xcalloc(size_t nmemb, size_t size);
void *xmalloc(size_t size);
-char * xstrdup(const char *s);
-
+char *xstrdup(const char *s);
+void *rtrim(char *s);
/*
* PalmOS records like fixed-point numbers, which should be rounded
}
static void
-gpx_track_hdr(route_head *rte)
+gpx_track_hdr(const route_head *rte)
{
fprintf(ofd, "<trk>\n");
if (rte->rte_name) {
}
static void
-gpx_track_tlr(route_hdr *rte)
+gpx_track_tlr(const route_head *rte)
{
fprintf(ofd, "</trkseg>\n");
fprintf(ofd, "</trk>\n");
GPS_Diag("\nTx Data:");
Diag(&packet->dle, 3);
- if((ret=GPS_Serial_Write(fd,(const void *)&packet->dle,(size_t)3)) == -1)
+ if((ret=GPS_Serial_Write(fd,(const void *) &packet->dle,(size_t)3)) == -1)
{
perror("write");
GPS_Error("SEND: Write to GPS failed");
return 1;
}
-int32 GPS_Serial_Write(int ignored, void *obuf, int size)
+int32 GPS_Serial_Write(int32 ignored, const void *obuf, int size)
{
DWORD len;
WriteFile (comport, obuf, size, &len, NULL);
return len;
}
-int GPS_Serial_Read(int ignored, void *ibuf, int size)
+int GPS_Serial_Read(int32 ignored, void *ibuf, int size)
{
DWORD cnt;
return read(handle, ibuf, size);
}
-int32 GPS_Serial_Write(int32 handle, void *obuf, int size)
+int32 GPS_Serial_Write(int32 handle, const void *obuf, int size)
{
return write(handle, obuf, size);
}
int32 GPS_Serial_Off(const char *port, int32 fd);
int32 GPS_Serial_Wait(int32 fd);
int32 GPS_Serial_Flush(int32 fd);
-int32 GPS_Serial_On_NMEA(const char *port, int32 *fd);
+int32 GPS_Serial_On_NMEA(const char *port, int32 *fd);
+int32 GPS_Serial_Read(int32 ignored, void *ibuf, int size);
+int32 GPS_Serial_Write(int32 ignored, const void *obuf, int size);
#endif
void GPS_Disable_User(void);
void GPS_Enable_User(void);
void GPS_Diagnose(int32 c);
+void GPS_Diag(const char *fmt, ...);
+
void GPS_Enable_Diagnose(void);
void GPS_Disable_Diagnose(void);
#include "defs.h"
+#include <ctype.h>
global_options global_opts;
ms_type_rgn = 0,
ms_type_wpt = 1,
ms_type_track = 2,
- ms_type_log = 3,
+ ms_type_log = 3
} ms_type;
* Now brutally truncate the resulting string, preserve trailing
* numeric data.
*/
- if ((i = strlen(ostring)) > target_len) {
+ if ((/*i = */strlen(ostring)) > target_len) {
strcpy(&ostring[target_len] - strlen(np), np);
}
return ostring;
#include "defs.h"
#include <stdio.h>
#include <stdlib.h>
+#include <ctype.h>
void *
xmalloc(size_t size)
{
&gpsman_vecs,
"gpsman",
- "GPSman"
+ "GPSman",
+ NULL
},
{
&gpx_vecs,
{
&mag_vecs,
"magellan",
- "Magellan protocol"
+ "Magellan protocol",
+ NULL
},
{
&mapsend_vecs,
"mapsend",
- "Magellan Mapsend"
+ "Magellan Mapsend",
+ NULL
},
{
&pcx_vecs,
{
&gpsutil_vecs,
"gpsutil",
- "gpsutil"
+ "gpsutil",
+ NULL
},
{
&tiger_vecs,
"tiger",
- "U.S. Census Bureau Tiger Mapping Service"
+ "U.S. Census Bureau Tiger Mapping Service",
+ NULL
},
{
&csv_vecs,
"csv",
- "Comma separated values"
+ "Comma separated values",
+ NULL
},
{
&xmap_vecs,
"xmap",
- "Delorme Topo USA4/XMap Conduit"
+ "Delorme Topo USA4/XMap Conduit",
+ NULL
},
{
&dna_vecs,
{
&cetus_vecs,
"cetus",
- "Cetus for Palm/OS"
+ "Cetus for Palm/OS",
+ NULL
},
{
&gpspilot_vecs,
"gpspilot",
- "GPSPilot Tracker for Palm/OS"
+ "GPSPilot Tracker for Palm/OS",
+ NULL
},
{
&magnav_vec,
"magnav",
- "Magellan NAV Companion for PalmOS"
+ "Magellan NAV Companion for PalmOS",
+ NULL
},
{
&garmin_vecs,
"garmin",
- "Garmin serial protocol"
+ "Garmin serial protocol",
+ NULL
},
{
&mxf_vecs,
{
&gpsdrive_vecs,
"gpsdrive",
- "GpsDrive Format"
+ "GpsDrive Format",
+ NULL
},
{
+ NULL,
NULL,
NULL,
NULL